package com.android.assignment.taskreminder;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Spinner;

public class TaskReminderEditFragment extends Fragment{

	public static final String DEFAULT_EDIT_FRAGMENT_TAG = "editFragmentTag";
	
	private EditText myTaskTitle;
	private EditText myTaskNote;
	private Button myDateButton;
	private Button myTimeButton;
	private Spinner myLoopSpinner;
	private Button myConfirmButton;
	private long myRowID;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		
		Bundle arguments = getArguments();
		
		if(arguments != null) {
			myRowID = arguments.getLong(TaskReminderProvider.COLUMN_ROWID);
		}
	}
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		View v = inflater.inflate(R.layout.reminder_edit, container, false);
		myTaskTitle = (EditText) v.findViewById(R.id.TaskTitle);
		myTaskNote = (EditText) v.findViewById(R.id.TaskNote);
		myDateButton = (Button) v.findViewById(R.id.remider_date);
		myTimeButton = (Button) v.findViewById(R.id.remider_time);
		myLoopSpinner = (Spinner) v.findViewById(R.id.remider_time_loop);
		myConfirmButton = (Button) v.findViewById(R.id.confirm);
		return v;
		
	}
}
